<?php
header('Content-type:text/html;charset=utf-8');

//包含数据库配置
include '../../public/peizhi.php';

//包含函数
include '../../public/func.php';

//调用函数
$link = db();

//接表单传值
$tz_id = $_POST['tz_id'];
$ht_id = $_POST['ht_id'];
$ht_content = $_POST['ht_content'];

//准备SQL语句
$sql = "update huitie set ht_content='{$ht_content}' where id='{$tz_id}'";

//判断并执行SQL语句
if($res = mysqli_query($link,$sql)){
	echo '<script>alert("修改回帖成功");window.location.href="show.php";</script>';
}else{
	echo '<script>alert("修改回帖失败");window.location.href="show.php";</script>';
}

//关闭数据库连接
mysqli_close($link);

